<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        var obj = {
            name:"刘总",
            age:18,
            print : function(){
                alert("姓名是："+this.name+", 年龄是："+this.age);
            }
        };

        alert(obj.name);
        obj.print();
    </script>
</head>
<body>
    
</body>
</html>